/**
 * <pre>
 * Copyright 2008 Antonio Jacob Costa (jacob.costa@gmail.com)
 * 
 * Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at 
 * 
 *   http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an &quot;AS IS&quot; BASIS, 
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
 * See the License for the specific language governing permissions and 
 * limitations under the License.
 * </pre>
 */
package org.ajc.maximo4eclipse.wizards;

import org.eclipse.jdt.internal.ui.IJavaHelpContextIds;
import org.eclipse.jdt.ui.wizards.NewClassWizardPage;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.IDialogPage;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.PlatformUI;

/**
 * <p>
 * Mbo wizard page.
 * </p>
 * 
 * @author Antonio Jacob Costa
 * @version 1.0.4
 */
public class MboWizardPage extends NewClassWizardPage {
  /**
   * <p>
   * Constructor for MboWizardPage.
   * </p>
   * 
   * @param pageName
   */
  public MboWizardPage(ISelection selection) {
    super();
  }
  
 
  /**
   * @see IDialogPage#createControl(Composite)
   */
  public void createControl(Composite parent) {
    initializeDialogUnits(parent);
    Composite composite = new Composite(parent, SWT.NONE);
    composite.setFont(parent.getFont());
    int nColumns = 4;
    GridLayout layout = new GridLayout();
    layout.numColumns = nColumns;
    composite.setLayout(layout);
    // pick & choose the wanted UI components
    createContainerControls(composite, nColumns);
    createPackageControls(composite, nColumns);
    createSeparator(composite, nColumns);
    createTypeNameControls(composite, nColumns);
    // createModifierControls(composite, nColumns);
    createSuperClassControls(composite, nColumns);
    // The super class is psdi.mbo.Mbo by default.
    this.setSuperClass("psdi.mbo.Mbo", true);
    
    // createSuperInterfacesControls(composite, nColumns);
    createCommentControls(composite, nColumns);
    enableCommentControl(true);
    setControl(composite);
    Dialog.applyDialogFont(composite);
    PlatformUI.getWorkbench().getHelpSystem().setHelp(composite,
        IJavaHelpContextIds.NEW_CLASS_WIZARD_PAGE);
  }
}